package com.cn.lycss.service;

import com.cn.lycss.dao.NavDao;
import com.cn.lycss.model.NavModel;

public class NavService {
    /*
    * 生成导航快捷方式
    * */
    public NavModel[] getNavModel() {
//    NavModel[] navModels={ null,null};
    NavModel[] navModels=new NavModel[6];
//    NavModel navModel=new NavModel();
//    navModel.setHref("home.jsp");
//    navModel.setTitle("首页");
//    navModels[0] =navModel;
//
//        NavModel navModel1=new NavModel();
//        navModel1.setHref("home.jsp");
//        navModel1.setTitle("首页");
//        navModels[1] =navModel;
        NavDao navDao=new NavDao();
        for (int i = 0; i <navModels.length ; i++) {
            NavModel navModel=new NavModel();
            navModel.setHref(navDao.href[i]);
            navModel.setTitle(navDao.titles[i]);
            navModels[i] =navModel;
        }
        return navModels;
    }

    public static void main(String[] args) {
        new NavService().getNavModel();
    }
}

